<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link type="text/css" rel="stylesheet" th:href="@{/css/style.css}" />
    <link type="text/css" rel="stylesheet" th:href="@{/css/public.css}" />
</head>
<body>
<div th:replace="~{common/head::head}"></div>
<div class="right">
    <div class="location">
        <strong>当前位置:</strong>
        <span>入库记录管理页面</span>
    </div>
    <div class="search">
        <form method="get" action="/sys/storageRecord/list">
            <span>商品名称：</span>
            <input name="queryGoodsName" type="text" th:value="${queryGoodsName}">
            <span>供货商：</span>
            <select name="querySupplierId">
                <option value="" th:if="${supplierList != null}">--全部--</option>
                <option th:each="supplier : ${supplierList}"
                        th:value="${supplier.id}"
                        th:text="${supplier.supName}"
                        th:selected="${supplier.id == querySupplierId}">
                </option>
            </select>
            <span>付款状态：</span>
            <select name="queryPayStatus">
                <option value="">--全部--</option>
                <option value="1" th:selected="${queryPayStatus} == 1">未付款</option>
                <option value="2" th:selected="${queryPayStatus} == 2">已付款</option>
            </select>
            <input type="hidden" name="pageIndex" value="1"/>
            <input value="查 询" type="submit" id="searchbutton">
            <a href="$/sys/storageRecord/toAdd" th:href="@{/sys/storageRecord/toAdd}">添加</a>
        </form>
    </div>
    <!--账单表格 样式和供货商公用-->
    <table class="supplierTable" cellpadding="0" cellspacing="0">
        <tr class="firstTr">
            <th width="15%">入库编号</th>
            <th width="10%">商品名称</th>
            <th width="10%">金额</th>
            <th width="20%">供货商</th>
            <th width="10%">付款状态</th>
            <th width="10%">创建时间</th>
            <th width="25%">操作</th>
        </tr>
        <tr th:each="storageRecord, status : ${storageRecordList}">
            <td th:text="${storageRecord.srCode}">[[${storageRecord.srCode}]]</td>
            <td th:text="${storageRecord.goodsName}"></td>
            <td th:text="${storageRecord.totalAmount}"></td>
            <td th:text="${storageRecord.supName}"></td>
            <td>
                <span th:if="${storageRecord.payStatus == 1}">未付款</span>
                <span th:if="${storageRecord.payStatus == 2}">已付款</span>
            </td>
            <td>
                <span th:text="${#temporals.format(storageRecord.createdTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
            </td>
            <td>
                <a class="viewStorageRecord" href="javascript:;" th:attr="storageRecordId=${storageRecord.id}, StorageRecordcc=${storageRecord.srCode}">
                    <img src="/images/view.png" alt="查看" title="查看"/>
                </a>
                <a class="modifyStorageRecord" href="javascript:;" th:attr="storageRecordId=${storageRecord.id}, StorageRecordcc=${storageRecord.srCode}">
                    <img src="/images/upd.png" alt="修改" title="修改"/>
                </a>
                <a class="deleteStorageRecord" href="javascript:;" th:attr="storageRecordId=${storageRecord.id}, StorageRecordcc=${storageRecord.srCode}">
                    <img src="/images/del.png" alt="删除" title="删除"/>
                </a>
            </td>
        </tr>
    </table>
    <!-- 隐藏输入字段 -->
    <input type="hidden" id="totalPageCount" th:value="${totalPageCount}"/>

    <!-- 引入其他模板并传递参数 -->
    <div th:insert="~{sysRole/rollpage :: rollpageFragment(totalCount=${totalCount}, currentPageNo=${currentPageNo}, totalPageCount=${totalPageCount})}"></div>

</div>
<section>
    <!--点击删除按钮后弹出的页面-->
    <div class="zhezhao"></div>
    <div class="remove" id="removeBi">
        <div class="removerChid">
            <h2>提示</h2>
            <div class="removeMain">
                <p>确定删除该订单吗？</p>
                <a href="#" id="yes">是</a>
                <a href="#" id="no">否</a>
            </div>
        </div>
    </div>
</section>
</section>
</div>

<footer th:replace="~{common/foot::foot}"></footer>
<script type="text/javascript" th:src="@{/js/storageRecord/list.js}"></script>
</body>
</html>
